/*
 * @Author: 徐博 
 * @Date: 2023-02-20 14:33:57 
 * @Last Modified by:   徐博 
 * @Last Modified time: 2023-02-20 14:33:57 
 */

<template>
    <div class="fullscreenLoading" v-if="loading">
        <Spin size="large" :spinning="loading" >
        </Spin>
    </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { Spin } from 'ant-design-vue';
const loading = ref<boolean>(false)
const show = ()=> {
    loading.value = true;
}
const hide = ()=> {
    loading.value = false;
}
defineExpose({
  loading,
  show,
  hide,
});
</script>

<style lang="less" scoped>
.fullscreenLoading {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-content: center;
   :deep(.ant-spin-dot) {
        top: 50%;
    }
}
</style>